package com.adou.second.day8;

import java.io.File;
import java.io.IOException;

/**
 * 删除文件
 * 绝对路径 ，相对路径
 * 先删除内容，在删除文件
 * @author admin
 *
 */
public class FileDemo03 {

	public static void main(String[] args) throws Exception {
		// 需要线创建文件夹
		File file = new File("myFile\\java.txt");

		System.out.println("createNewFile：" + file.createNewFile());

		System.out.println("delete：" + file.delete());

		System.out.println("----------------------------------");
		
		
		File fil2 = new File("myFile\\myFile2");

		System.out.println("createNewFile：" + fil2.createNewFile());

		System.out.println("mkdir：" + fil2.mkdir());
		
		File file3 = new File("myFile\\myFile2\\java.txt");
		System.out.println("createNewFile：" + fil2.createNewFile());
		
		
		
		
		
		
	}

}
